home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / GMSMTH01.ZIP / INCLUDE / LINE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-13  |  762 b   |  49 lines

  1. /*
  2.  
  3.     line.h
  4.  
  5.     Copyright 1994, August 22 by Alec Russell, ALL rights reserved
  6.  
  7.     Created - 1994/8/22
  8.  
  9.     A slow hi-level line drawing func. Handy to move sprites
  10.     along arbitrary straight line paths.
  11.  
  12.     History:
  13.         New file
  14.  
  15. */
  16.  
  17. #ifndef DEF_LINE
  18. #define DEF_LINE 1
  19.  
  20. #include <g_def.h>
  21.  
  22. enum QUAD
  23. {
  24.    Q_ZERO,
  25.    Q_ONE,
  26.    Q_TWO,
  27.    Q_THREE,
  28.    Q_VERT,
  29.    Q_HORZ,
  30.    Q_SAME
  31. };
  32.  
  33. typedef struct
  34.    {
  35.    BYTE quad;
  36.    short step;
  37.    short x, y, x1, y1;
  38.    short ai, bi, yi, d, dx, dy;
  39.    }
  40. d_line_t;
  41.  
  42. void init_dline(short x0, short y0, short x1, short y1, short step, d_line_t *dl);
  43. short next_dline(d_line_t *dl);
  44.  
  45. #endif
  46.  
  47. /* ------------------------------ EOF -------------------------------- */
  48.  
  49.